package org.huntaway.kindergarten.po.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the journal table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="journal"
 */

public abstract class BaseIncome extends org.huntaway.kindergarten.po.Journal  implements Serializable {

	public static String REF = "Income";
	public static String PROP_IN_AUTHOR = "inAuthor";
	public static String PROP_ID = "Id";
	public static String PROP_IN_DEFINE = "InDefine";


	// constructors
	public BaseIncome () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseIncome (java.lang.Integer id) {
		super(id);
	}

	/**
	 * Constructor for required fields
	 */
	public BaseIncome (
		java.lang.Integer id,
		org.huntaway.kindergarten.po.SysUser biAuthor,
		java.math.BigDecimal amount,
		java.util.Date biDate) {

		super (
			id,
			biAuthor,
			amount,
			biDate);
	}



	private int hashCode = Integer.MIN_VALUE;


	// many to one
	private org.huntaway.kindergarten.po.Personinfo inAuthor;
	private org.huntaway.kindergarten.po.InDefine inDefine;






	/**
	 * Return the value associated with the column: in_author
	 */
	public org.huntaway.kindergarten.po.Personinfo getInAuthor () {
		return inAuthor;
	}

	/**
	 * Set the value related to the column: in_author
	 * @param inAuthor the in_author value
	 */
	public void setInAuthor (org.huntaway.kindergarten.po.Personinfo inAuthor) {
		this.inAuthor = inAuthor;
	}



	/**
	 * Return the value associated with the column: fina_type
	 */
	public org.huntaway.kindergarten.po.InDefine getInDefine () {
		return inDefine;
	}

	/**
	 * Set the value related to the column: fina_type
	 * @param inDefine the fina_type value
	 */
	public void setInDefine (org.huntaway.kindergarten.po.InDefine inDefine) {
		this.inDefine = inDefine;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof org.huntaway.kindergarten.po.Income)) return false;
		else {
			org.huntaway.kindergarten.po.Income income = (org.huntaway.kindergarten.po.Income) obj;
			if (null == this.getId() || null == income.getId()) return false;
			else return (this.getId().equals(income.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}